package com.hl.sfzy.controller.course;

import com.hl.sfzy.mapper.course.CoursetypeMapper;
import com.hl.sfzy.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: sfzy
 * @description:
 * @author: xiaoyan
 * @create: 2024-09-06 17:03
 **/
@RestController
@RequestMapping("/courseType")
public class CourseTypeAllController {
    @Autowired
    private CoursetypeMapper coursetypeMapper;
    @GetMapping("/content")
    public R courseTypeAllContent(){
        List allType = coursetypeMapper.findAllType();
        return allType.size()>0?R.success(allType):R.failure("500");
    }
}
